#ifndef RESOURCEMANAGER_H
#define RESOURCEMANAGER_H

#include <QObject>
#include <QList>
#include "resourcelist.h"

class ResourceManager : public QObject
{
public:
    virtual ResourceList * getResources() =0;
    virtual bool addResource(Resource * r) =0;
    virtual bool updateResource(Resource * r)=0;
    virtual bool deleteResource(Resource * r)=0;
    virtual bool isValid();
    virtual QString getLastError()=0;
    enum ManagerType {Bd,Xml};

    static ResourceManager* getMangaInstance(ManagerType m);
    static ResourceManager* getBookmarkInstance(ManagerType m);

protected:
    ResourceList * m_list;
    bool m_valid;

};

#endif // RESOURCEMANAGER_H
